from twisted.internet.protocol import ClientFactory


class ChatClient(Factory):
    def __init__(self, username):
        self.username = username
    
    def protocol(self):
        return self
    
    def connect(self):
    
    @classmethod
    def login(cls, host, port, username):
        inst = cls(username)
        reactor.connectTCP(host, port, inst)
        return inst
    
    
    



